//存 取 删token 
const TOKENKEY = 'token' 
//存储token
const setToken = (token:string) => {
   return window.localStorage.setItem(TOKENKEY,token)
}

//获取token
const getToken = () => {
    return window.localStorage.getItem(TOKENKEY)
}

//删除token
const removeToken = () => {
    return window.localStorage.removeItem(TOKENKEY)
}


export {
    setToken,
    getToken,
    removeToken
}
//获取无感刷新token
export const getRefreshToken = () => localStorage.getItem('refreshToken');
//清除无感刷新token
export const clearTokens = () => {
  localStorage.removeItem('token');
  localStorage.removeItem('refreshToken');
};